package com.democxy.modules.cms.api;

import java.util.List;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.democxy.common.baseData.ResponeData;
import com.democxy.modules.cms.entity.AdHref;
import com.democxy.modules.cms.entity.BlogType;
import com.democxy.modules.cms.entity.Blogs;
import com.github.pagehelper.PageInfo;

@FeignClient(value = "DEMOCXYCLOUD-BLOG",fallbackFactory=ArticleServiceFallbackFactory.class)
public interface ArticleService {
	
	@RequestMapping(value = "/admin/cms/blogs/get/{id}", method = RequestMethod.GET)
	public ResponeData<Blogs> getById(@PathVariable("id") String id);

	
	@RequestMapping(value = "/admin/cms/blogs/list")
	public ResponeData<PageInfo<Blogs>> list(@RequestBody Blogs blogs);
	
	
	@RequestMapping(value = "/admin/cms/blogs/getBlogs")
	public ResponeData<List<Blogs>> getBlogs(@RequestParam("pageSize") Integer pageSize,@RequestParam("orderBy") String orderBy);


	@RequestMapping(value = "/admin/cms/adHref/list")
	public ResponeData<PageInfo<AdHref>> adList(@RequestBody AdHref adHref);
	
	@RequestMapping(value = "/admin/cms/adHref/get/{id}", method = RequestMethod.GET)
	public ResponeData<Blogs> getAdById(@PathVariable("id") String id);
	
	
	@RequestMapping(value = "/admin/cms/blogType/list")
	public ResponeData<PageInfo<BlogType>> typeList(@RequestBody BlogType blogType);
}
